package com.example.design.dahua.chainofresponsibility.old;

/**
 * @author ebnew
 * 测试类
 */
public class Test {
    public static void main(String[] args) {

        //三个管理者
        Manager jinli = new Manager("经理");
        Manager zongjian = new Manager("总监");
        Manager zhongjingli = new Manager("总经理");

        //小菜请求加薪1000
        Request request = new Request();
        request.setNumber(1000);
        request.setRequestType("加薪");
        request.setRequestContent("小菜请求加薪");

        //不同的级别对此请求做出判断和处理
        jinli.getRequest("经理", request);
        zongjian.getRequest("总监", request);
        zhongjingli.getRequest("总经理", request);

        //小菜请假三天
        Request request2 = new Request();
        request2.setNumber(3);
        request2.setRequestType("请假");
        request2.setRequestContent("小菜请假");

        //不同的级别对此请求做出判断和处理
        jinli.getRequest("经理", request2);
        zongjian.getRequest("总监", request2);
        zhongjingli.getRequest("总经理", request2);

    }
}
